//
//  AddressCell.m
//  BigJoy
//
//  Created by Rowling on 2017/7/7.
//  Copyright © 2017年 Rowling. All rights reserved.
//

#import "AddressCell.h"

@interface AddressCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *labelConst;

@end

@implementation AddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(void)setIsDefault:(BOOL)isDefault {
    _isDefault = isDefault;
    if (isDefault) {
        self.labelConst.constant = 10;
        self.iconImageView.hidden = NO;
    }else {
        self.labelConst.constant = -17;
        self.iconImageView.hidden = YES;
    }
    
}

+(instancetype)cellWithTalbelView:(UITableView *)table {
    AddressCell * cell = [table dequeueReusableCellWithIdentifier:@"ADCell"];
    if (cell == nil) {
        cell = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
    }
    return cell;
}

@end
